* {
    margin: 0;
    padding: 0;
}
@iconColor: rgb(36, 66, 218);
@backgroundColor: rgb(76, 98, 209);
body {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

// checkbox值改变后
#search_btn:checked {
    // 搜索图标1隐藏
    &+.search-btn {
        display: none;
    }
    // 关闭图标显示
    &~.close-btn {
        display: block;
    }
    //container占满全屏
    &~.container {
        clip-path: circle(100%);
        //搜索框盒子有了宽度
        .search-box {
            width: 500px;
        }
    }
}

.search-btn {
    z-index: 1;
    i {
        color: @iconColor;
        font-size: 22px;
    }
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1;
    display: none;

    i {
        color: @iconColor;
        font-size: 22px;
    }
}

.container {
    position: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    clip-path: circle(40px at 50% 50%);
    background: linear-gradient(200deg,#6e86ee,#453c90);;
    transition: .5s;

    .search-box {
        width: 0;
        height: 50px;
        transition: .5s;
        overflow: hidden;
        border-bottom: 3px solid #fff;

        input {
            width: 93%;
            height: 50px;
            outline: none;
            border: none;
            background: none;
            color: #fff;
            font-size: 22px;
            text-indent: 8px;

            &::placeholder {
                color: #fff;
            }
        }

        i {
            color: @iconColor;
            font-size: 22px;
        }
    }
}